package zut.edu.cs.network.thread.yield;

public class YieldRun implements Runnable {

	@Override
	public void run() {
		for (int i = 0; i < 10; i++) {
			if (i == 5) {
//				让当前线程由“运行状态”进入到“就绪状态”
				Thread.yield();
			}
			System.out.println(Thread.currentThread().getName()+"------"+i);
		}
	}
	
	

}
